package com.zym.field_method09;

public class Goods {//商品类
    //1.属性
    private String goodName;//商品名称
    private String type;//类型
    private double price;//价格

    //2.方法
    /*
    ①私有属性的get/set方法
    ②当前类 自身的方法----->后期 这个会单独放到业务类中
     */

    public void setGoodName(String goodNameParam){
        goodName = goodNameParam;
    }
    public String getGoodName(){
        return goodName;
    }

    public void setPrice(double priceParam){
        price = priceParam;
    }

    public double getPrice() {
        return price;
    }

    public void setType(String typeParam){
        type = typeParam;
    }

    public String getType(){
        return type;
    }

    //3.构造器 ---->一个类至少有一个 无参的构造器

    public Goods(){

    }

    public Goods(String goodNameParam,String typeParam,double priceParam){
        goodName = goodNameParam;
        type = typeParam;
        price = priceParam;

    }


}
